/*
 * @Description: 你的代码我的心
 * @Author: GGB
 * @Date: 2022-01-25 10:40:31
 * @LastEditors: GGB
 * @LastEditTime: 2022-01-25 18:17:14
 */
/*
 * @Description: 你的代码我的心
 * @Author: GGB
 * @Date: 2021-12-27 09:35:08
 * @LastEditors: GGB
 * @LastEditTime: 2022-01-24 16:28:33
 */

import { BasicFetchResult } from '/@/api/model/baseModel';

export type MenuDataModel = {
  children?: Recordable[];
  create_time: string;
  actions?: Recordable[];
  name: string;
  parent_id: number;
  sort: number;
  update_time: string;
  url: string;
  action_mark: string;
  apiIds: number[];
  menu_id: number;
  module: number;
  path: string;
};

export type MenuFormParams = {
  name?: string;
  parent_id?: number;
  url?: string;
  sort?: number;
  apiIds?: number[] | string[];
  module?: number;
  action_mark?: 'add' | 'edit' | 'delete';
};

export type MenuParams = {
  menuId?: string | number;
  form: MenuFormParams;
};
export type DeleteMenuParams = {
  menuId?: string | number;
};
export type DetailMenuParams = {
  menu_id?: string | number;
};

export type BindApiMenuParams = {
  menu_id?: string | number;
  form: MenuFormParams;
};

export type MenuListGetResultModel = BasicFetchResult<any>;
